I have to copy one string from to All this is to be done without using the uber elite library. So no . This is to be done within a function, so assume everything out of the function is properly done. My main question was, without using strcpy, or the cstring library, is there a more efficient way of doing this then I have listed here.
Code:
void strcat(char s1[], const char s2[]) {
int i = 0;
while ( (s1[i] = s2[i]) != '\O')
i++;
s1[i] = '\O'; // This line is not altogether necessary, but just helps anyway.
}
Thanks for any replies!